<html>
<div id='whole'>
<head>
   <link href="/site_media/css/page.css" site_media="screen" rel="Stylesheet" type="text/css" />
   <link href="/site_media/css/test.css" site_media="screen" rel="Stylesheet" type="text/css" />
   {% ifequal testrun.teststatus_id 4 %}
   <meta http-equiv="refresh" content="5" />
   {% endifequal %}

<script type="text/javascript">
function init()
{
    logarea.scrollTop = logarea.scrollHeight;
    errarea.scrollTop = errarea.scrollHeight;
}
</script>
</head>

<body onload="init()">
<h1>Test Run Details</h1> 

<div class="test">
Name: {{ test.testname }} 
<br>
Type: {{ test.testtype }}
<br>
Command: {{ test.testcmd }}
<br>
Date Executed: {{ testrun.testtime }}
<p>

Test Status:
            {% ifequal testrun.teststatus_id 4 %}
            <FONT COLOR="#CC9900">
            {% else %}{% ifequal testrun.teststatus_id 3 %}
                <FONT COLOR="#009900">
            {% else %}{% ifequal testrun.teststatus_id 2 %}
                <FONT COLOR="#000099">
            {% else %}{% ifequal testrun.teststatus_id 1 %}
                <FONT COLOR="#990000">
            {% else %}
                <FONT COLOR="#000000">
            {% endifequal %}
            {% endifequal %}
            {% endifequal %}
            {% endifequal %}
            {{ testrun.teststatus }}
            </FONT>
<p>

<div class="results">
    <h2>Results:</h2>
        <table class="data">
        <thead>
            <tr>
                {% for name, value in results.0.items %}
                <td> {{ name }} </td>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
        {% for result in results %}
        <tr>
        {% for name, value in result.items %}
            <td> {{ value }} </td>
        {% endfor %}
        </tr>
        {% endfor%}
        </tbody>
    </table>
</div>
<p>
</div>
<p>
<div class="log">
    TestSuiteRun Log:<br>
    <TEXTAREA id="logarea" rows=20 cols=80> 
        {{ testrun.logtail }}
    </TEXTAREA>
<p>
    TestSuiteRun Err:<br>
    <TEXTAREA id="errarea" rows=20 cols=80>
        {{ testrun.errtail }}
    </TEXTAREA>
</div>
<p>
<a href="/testsuiteruns">up</a>
<a href="{{ surf.prev }}">previous</a>
<a href="{{ surf.next }}">next</a>
</body>
</div>
</html>
